home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
9-Digit Zip Code Directory
/
9-Digit Zip Code Directory (American Business Information) (ABIZIP-12).ISO
/
z4src.zip
/
ZIABOUT.CPP
< prev
next >
Wrap
C/C++ Source or Header
|
1993-08-18
|
3KB
|
119 lines
//----------------------------------------------------------------------------
// MODULE DESCRIPTION
//
// Module: zn.cpp
// Title: Zinc Window Template
// Notice: John M. Weeder
// Copyright (c) 1993. All rights reserved.
// This module contains proprietary information and should be
// treated as confidential.
//
//----------------------------------------------------------------------------
// MAINTENANCE HISTORY
//
// $Workfile$
// $Revision$
// $Author$
// $Date$
// $Log$
//
//----------------------------------------------------------------------------
// MODULE NARRATIVE
//
// This module contains code for the class ZI_ABOUT.
//
// The code in this module may be written in C++ or C.
//
// This module is portable to:
// DOS 3.X+
// MS Windows 3.X+
// OS/2 2.X+
// OS/2 2.0 PM
//
// The following compilers are supported:
// MSC 6.0A
// MSC/C++ 7.0
// Borland C++ 3.1 for DOS
// Borland C++ 1.0 for OS/2 2.X
//
//----------------------------------------------------------------------------
#include <zi.hpp>
#define USE_WIN_ABOUT
#if OS_DOS
#include <zid.hpp>
#elif OS_WINDOWS
#include <ziw.hpp>
#else
#include <zio.hpp>
#endif
//----------------------------------------------------------------------------
// Description: Default constructor
// Parameters:
// Returns:
//----------------------------------------------------------------------------
FN_M ZI_ABOUT::ZI_ABOUT()
: ZN_WINDOW("WIN_ABOUT", ZN_LOAD_CENTER|ZN_LOAD_NO_SHOW)
{
ZI_ABOUT::Initialize(CL_INIT_CLASS);
Setup();
}
//----------------------------------------------------------------------------
// Description: Destructor
// Parameters:
// Returns:
//----------------------------------------------------------------------------
FN_M ZI_ABOUT::~ZI_ABOUT()
{
ZI_ABOUT::Destroy(FALSE);
Terminate();
}
//----------------------------------------------------------------------------
// Description: Event monitor function.
// Parameters: msg Event code
// pv1 Data pointer 1
// pv2 Data pointer 2
// Returns: Event code
//----------------------------------------------------------------------------
ZN_MSG FN_M ZI_ABOUT::User(ZN_MSG msg, PVOID, PVOID)
{
switch (msg)
{
case ZN_MSG_INIT:
{
CHAR szFormat[80];
sprintf(szFormat, "Version %s", CfgGet(CFG_VERSION));
SetString(FID(STR_VERSION), szFormat);
CL_PARM cl_parm;
TIMET timeExpire;
cl_parm.SetName("EXPIRE_DATE");
cl_parm.Get(NULL, "EXPIRE_DATE");
timeExpire = (TIMET)(ULONG)cl_parm;
SetDate(FID(DATE_EXPIRE), timeExpire);
}
return msg;
case ZN_MSG_TERMINATE:
return msg;
}
if (IsError()) // Error condition
return msg;
switch (msg)
{
case BUTTON_OK:
Close();
break;
}
return msg;
}
//----------------------------------------------------------------------------
//------------------------------- End of File --------------------------------
//----------------------------------------------------------------------------